package cn.kgc.tangcco.controller;

import cn.kgc.tangcco.service.UserService;
import cn.kgc.tangcco.service.impl.UserServiceImpl;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 李昊哲
 * @Description
 * @create 2020/9/10 下午2:58
 */
public class UserAction {
    private static UserService userService = null;
    static {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        userService = (UserService) context.getBean("userService");
    }
    public void addUser(){
        userService.addUser();
    }
}
